<template>
  <div class="base-card">
    <div class="card-title">
      <span class="line"></span>
      <span class="text">{{ title }}</span>
      <span class="line"></span>
    </div>
    <div class="title-line"></div>
    <slot name="content"></slot>
  </div>
</template>

<script setup lang="ts" name="baseCard">
defineProps<{
  title: string
}>()
</script>

<style scoped lang="less">
.base-card {
  margin: 30px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  .card-title {
    display: flex;
    align-items: center;
    justify-content: center;
    .text {
      font-size: 28px;
    }
    .line {
      width: 50px; /* 横线的宽度 */
      height: 1px; /* 横线的高度 */
      background-color: #ccc; /* 横线的颜色 */
      margin: 0 5px; /* 横线与文本之间的间距 */
    }
  }
  .title-line {
    margin: 30px 0;
    height: 10px;
    width: 150px;
    border-radius: 5px;
    background: linear-gradient(to right, #d4ed04, #ff8149);
  }
}
</style>
